<script>
import splitPane from 'vue-splitpane'

export default {
  name: 'SplitpaneDemo',
  components: { splitPane },
  methods: {
    resize() {
      console.log('resize')
    }
  }
}
</script>

<template>
  <div class="app-container">
    <split-pane split="vertical" :default-percent='70' @resize="resize">
      <template slot="paneL" >
        <div class="left-container" >
          <el-row style="font-family: '微软雅黑 Light',serif; font-size: 25px; line-height:1.7 ;">青春是一个短暂的美梦, 当你醒来时, 它早已消失无踪</el-row>
          <el-divider></el-divider>
          <span>少量的邪恶足以抵消全部高贵的品质, 害得人声名狼藉</span>
        </div>
      </template>
      <template slot="paneR" >
        <split-pane split="horizontal" :default-percent='60'>
          <template slot="paneL">
            <div class="top-container" />
          </template>
          <template slot="paneR">
            <div class="bottom-container" />
          </template>
        </split-pane>
      </template>
    </split-pane>
  </div>
</template>

<style scoped lang="scss">
.app-container {
  position: relative;
  height: 100vh;
  border-radius: 15px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);

  .left-container {
    height: 100%;
    border-radius: 15px;
    margin-left: 30px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  }

  .right-container {
    height: 200px;

  }

  .top-container {
    border-radius: 15px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    width: 100%;
    height: 100%;
  }

  .bottom-container {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    margin-right: 30px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);

  }
}
</style>
